https://leetcode.cn/problems/climbing-stairs/submissions/

class Solution70:
    def climbStairs(self, n: int) -> int:
        if n == 1:
            return 1
        if n == 2:
            return 2
        result = 0
        pre = 2
        prepre = 1
        for x in range(3,n+1):
            result = pre + prepre
            prepre = pre
            pre = result
        return result
